package com.alibaba.dubbo.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import reactor.core.publisher.MonoSink;

public class NotifyService implements Notify {
	private static Logger logger = LoggerFactory.getLogger(NotifyService.class);

    @Override
    public void oninvoke(Student st) {
    	logger.info("======oninvoke======, param: " + st.getName());
    }

    @Override
    public void onreturn(Student result, MonoSink<Student> sink, Student param) {
    	logger.info("======onreturn======, param: " + param.getName() + ", result: " + result);
    	sink.success(result);
    }

    @Override
    public void onthrow(Throwable ex, MonoSink<Student> sink, Student param) {
    	logger.error("======onthrow======, param: " + param.getName(), ex);
    	sink.error(ex);
    }

}